<template>
  <div class="container">
    <div class="help-main">
      <div class="logo-item">
        <span class="logo-pic" @click="routeToPath('/')">
          <img src="@/assets/images/meal/logo.png"/>
        </span>
        <img src="@/assets/images/help/help_10.png">
        <span class="logo-help">帮助中心</span>
      </div>
      <div class="search-item">
        <div class="search-con">
          <input class="search-input"  type="text" v-model="title" placeholder="请输入您需要解决的问题" @keyup.enter="routeToPath('/help/detail?title='+title, 'current')" >
          <span class="search-btn"  @click="routeToPath('/help/detail?title='+title, 'current')"><img src="../../../assets/images/help/search.png"/></span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Header',
  components: {

  },
  data() {
    return {
      title:'',
    }
  },
  created() {
      this.title = '';
      var title = this.$route.query.title;
      if(title !=undefined && title != null){
          this.title = title;
      }
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.container{
  width: 100%;
  height: 85px;
  background: #fff;
  min-width: 1200px;
  .help-main{
    width: 1200px;
    height: 85px;
    margin: 0 auto;
    .logo-item{
      float: left;
      .logo-pic{
        display: inline-block;
        margin-top: 16px;
        margin-right: 20px;
        cursor: pointer;
      }
      .logo-help{
        display: inline-block;
        height: 50px;
        line-height: 50px;
        font-size: 18px;
        color: #333;
        padding-left: 18px;
        margin-top: 18px;
        vertical-align: top;
        // border-left: 1px solid #eee;
      }
    }
    .search-item{
      float: right;
      margin-top: 20px;
      .search-con{
        .search-input{
          width: 350px;
          height: 36px;
          line-height: 36px;
          background: #F0F0F0;
          border: none;
          outline: none;
          padding: 0 15px 0 15px;
          border-radius:18px 0 0 0px;
          vertical-align: top;
        }
        .search-btn{
          display: inline-block;
          vertical-align: top;
          cursor: pointer;
        }
      }
    }
  }
}
</style>
